USE [BusSystem]
GO

/****** Object:  Table [dbo].[Bus_BusAccident]    Script Date: 05/24/2010 23:38:42 ******/
SET ANSI_NULLS ON
GO

SET QUOTED_IDENTIFIER ON
GO

SET ANSI_PADDING ON
GO

CREATE TABLE [dbo].[Bus_BusAccident](
	[RecID] [int] NOT NULL,
	[DocID] [varchar](20) NOT NULL,
	[BusID] [varchar](20) NOT NULL,
	[CompanyID] [varchar](20) NULL,
	[CompanyName] [nvarchar](50) NULL,
	[DriverID] [varchar](20) NULL,
	[AccidentTime] [smalldatetime] NULL,
	[AccidentAddress] [nvarchar](50) NULL,
	[AccidentDesc] [nvarchar](200) NULL,
	[AccidentPic] [nvarchar](200) NULL,
	[AccidentResponsibility] [nvarchar](200) NULL,
	[TrafficPoliceDisposition] [nvarchar](100) NULL,
	[TrafficProcessRecord] [nvarchar](max) NULL,
	[TotalCost] [decimal](18, 0) NULL,
	[InsurancePay] [decimal](18, 0) NULL,
	[AdversePartyPay] [decimal](18, 0) NULL,
	[DriverPay] [decimal](18, 0) NULL,
	[CompanyPay] [decimal](18, 0) NULL,
	[CompleteDate] [smalldatetime] NULL,
	[RecDivID] [varchar](20) NOT NULL,
	[RecAcct] [varchar](20) NOT NULL,
	[RecDate] [smalldatetime] NOT NULL,
	[Note] [nvarchar](200) NULL,
	[UserAcct] [varchar](20) NOT NULL,
	[LastUpdateDate] [smalldatetime] NOT NULL,
 CONSTRAINT [PK_Bus_BusAccident] PRIMARY KEY CLUSTERED 
(
	[DocID] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]
) ON [PRIMARY]

GO

SET ANSI_PADDING OFF
GO

ALTER TABLE [dbo].[Bus_BusAccident] ADD  CONSTRAINT [DF_Bus_BusAccident_RecID]  DEFAULT ((0)) FOR [RecID]
GO


